User-agent: *
Allow: /a
Allow: /b
Allow: /posts/*
Disallow: /
Disallow: /a/*
Disallow: /b/*
Disallow: /posts

Sitemap: https://sitemap-robots.now.sh/sitemap.xml